﻿@page
@model ForgotPasswordModel
@{
    ViewData["PageName"] = "forgotpassword";
}

@section PageHeading {
    <div class="col-xl-12">
        <h2 class="fs-xxl fw-500 text-white text-center">
            我的密码丢了
          <small class="h3 fw-300 mt-3 mb-5 text-white opacity-60 hidden-sm-down">
            这不是问题，只需使用下面的表单来重置它!
          </small>
        </h2>
    </div>
}

<div class="col-xl-6 ml-auto mr-auto">
    <div class="card p-4 rounded-plus bg-faded">
        <form id="js-login" method="post">
            <div class="form-group">
                <label class="form-label" asp-for="Input.Email">您注册的邮件地址或用户名</label>
                <input type="email" asp-for="Input.Email" class="form-control" placeholder="邮件地址" required>
                <span class="invalid-feedback" asp-validation-for="Input.Email">不是有效的邮件地址.</span>
                <div class="help-block">我们将用电子邮件告诉你如何重置密码.</div>
            </div>
            <div class="row no-gutters">
                <div class="col-md-4 ml-auto text-right">
                    <button id="js-login-btn" type="submit" class="btn btn-danger">找回</button>
                </div>
            </div>
        </form>
    </div>
</div>

@section Scripts {
    <partial name="_ValidationScriptsPartial" />
    <script>
        $("#js-login-btn").click(function (event) {
            // Fetch form to apply custom Bootstrap validation
            var form = $("#js-login");

            if (form[0].checkValidity() === false) {
                event.preventDefault();
                event.stopPropagation();
            }

            form.addClass('was-validated');
            // Perform ajax submit here...
        });
    </script>
}
